package cn.luyou.admin.service;

import cn.luyou.admin.dto.*;
import cn.luyou.admin.entity.ExamRecord;
import cn.luyou.admin.entity.ExamRecordDetail;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface ExamRecordService extends IService<ExamRecord> {
    
    // 获取考试记录列表
    IPage<ExamRecordDto> getRecords(Integer pageNum, Integer pageSize, Long userId, String keyword);
    
    // 提交考试答案
    ExamRecord submitAnswers(SubmitAnswerDTO submitAnswerDTO, Long userId);
    
    // 获取考试记录详情
    List<ExamRecordDetail> getRecordDetails(Long recordId);
    
    // 获取用户错题列表
    List<ExamRecordDetailDto> getWrongQuestions(Long userId);
    
    // 获取班级成绩统计
    List<ExamRecord> getClassScores(String className, Long paperId);
    
    // 获取个人成绩统计
    List<ExamRecord> getUserScores(Long userId);

    // 获取班级成绩统计数据
    ScoreStatisticsDTO getClassScoreStatistics(String className, Long paperId);
    
    // 获取个人成绩趋势数据
    List<ExamRecord> getUserScoreTrend(Long userId, Integer limit);

    StatisticsDTO getStatistics(Long userId);
} 